#define _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) {
        int* head1 = nums1;
        int* tail1 = nums1 + m - 1;
        int* head2 = nums2;
        int* tail2 = nums2 + n - 1;
        int cnt = m + n;
        while (cnt >= 3 && head1 <= tail1 && head2 <= tail2) {
            if (nums1[head1] < nums2[head2])head1++;
            else head2++;
            if (nums1[tail1] > nums2[tail2])tail1--;
            else tail2--;
        }
        if (head1 > tail1) {
            while (cnt >= 3)
        }
    }
};